1. Field of the Invention
This invention pertains generally to sub-pixel interpolation within video encoding, and more particularly to iterative computation of adaptive interpolation filters for sub-pixels of a picture processed within a video codec.
2. Description of Related Art
A video codec encodes a sequence of video frames which each have a plurality of pixels having corresponding pixel values. The encoding process generally refers to converting pixel values of a frame according to one or more encoding approaches into an output bit stream which can be received separately in time and/or space for decoding into frames which closely approximate the original frames to an acceptable error level.
Predictive encoding predicts elements of a frame based on prior decoded frames and generates difference signals between predicted and original frames. The difference may be further compressed and sent as an encoded signal. The decoder similarly performs prediction, therein reducing data transfer between encoder and decoder, and adds the difference signals to decode the signal and recreate the original frames to a desired or sufficient degree of accuracy.
Further compression is achieved in response to motion compensation in which blocks of one frame can be utilized to predict blocks in other frames and locations thereof, to increase compression. The prediction comprises a displacement referred to as a motion vector. Motion vectors are often specified in terms of pixel positions, and even for predicting movement to the granularity of sub-pixels. Sub-pixel motion estimations require that the image frame also be generated at sub-pixel granularity, even though the image sensor hardware itself may only generate a single pixel for each pixel position.
Sub-pixel motion estimation requires that additional sub-pixel values be generated from the source pixels, such as within an interpolation process which is often used for generating sub-pixel values. Interpolation generally entails processing pixel values surrounding a given pixel and interpolating characteristics from which the sub-pixels are estimated. The default level of resolution for motion estimation under MPEG-4 is typically a half pixel (Hpel) (where “pel”=picture element=pixel), while quarter pixel (Qpel), and other resolutions can be supported.
Interpolation filters are typically utilized to perform motion estimation and compensation of sub-pixel values (fractional pel resolution). In one approach, a horizontal or vertical 6-tap Wiener interpolation filter is first used to calculate half-pel positions, then another filter is applied, such as a bilinear filter, to obtain quarter-pel positions. An adaptive interpolation filter approach has also been proposed in which the filter is independently estimated for each image, to take into account the alteration of image signal properties, in particular aliasing, toward minimizing predictive error energy. Displacement vectors estimated in a first iteration are then used in further iterations using other interpolation filters.
For example, toward improving video encoding, the fixed encoding of AVC, was replaced in the KTA 1.8 standard with the ability to dynamically change the interpolation filter as seen in FIG. 1. The KTA 1.8 codec estimates the filter coefficients in a fixed two-pass algorithm, in which it uses a pre-determined (fixed) interpolation filter, and then estimates an adaptive interpolation filter based on the motion vectors from the fixed interpolation. In contrast to a fixed filter, the adaptive filter is adaptive by virtue of its ability to change from frame to frame as the video sequence progresses.
More specifically, in the first pass, the predetermined interpolation filter from AVC is used to compress the current picture and to estimate the optimal interpolation filter based on the current sub-pixel motion vectors. In the second pass, the estimated adaptive interpolation filter (AIF) from the first pass is used to replace the AVC interpolation filter to compress the current picture again. Then the KTA 1.8 decides whether the coded representation of the picture in the first pass or the second pass should be selected as the final representation of the picture. In this fixed two pass algorithm, the adaptive interpolation filter is intended to improve the AVC interpolation filter to increase coding efficiency. In KTA 1.8, the adaptive interpolation filter is computed in a single iteration from the fixed motion vectors and used to encode the picture in the second pass. However, it is desirable to obtain further compression gains within the encoded video without the need to sacrifice quality.
Accordingly, a need exists for a sub-pixel interpolation mechanism which increases coding efficiency and is readily determined. The present invention fulfills that need and is particularly well-suited for increasing coding efficiency within a codec following advanced video coding standards.